Guard Data
Guard data refers to 0x1DC of data used to store specific information relating to a particular guard. The name is a bit of a misnomer; players also have guard data of their own in addition to player data, but not all the fields are utilized. A pointer to the guard data list can be found at the address 8002CC64. The Data and Its Use Many action types affect one or more of the entires in guard data. Guard bitflags are stored in this area as well. Fields marked unknown have not yet been identified. Given is the offset to each data, in hexadecimal, as well as its size and function if known. Unknown Offset 0x0, 1 byte. Its use is unknown, but the value is set by action type 8E. Guard ID Offset 0x1, 1 byte. This is the guard's ID number. It is used to call the guard in action blocks and assign items. Unknown Offset 0x2, 1 byte. Unknown Offset 0x3, 1 byte. Rounds Fired from Right Weapon Offset 0x4, 1 byte. A count of the number of rounds fired from the weapon in the right hand. Rounds Fired from Left Weapon Offset 0x5, 1 byte. A count of the number of rounds fired from the weapon in the left hand. Head Offset 0x6, 1 byte. The head model currently attached to the character. Current Action Type Offset 0x7, 1 byte. Each action has a specific action type assigned to it. This indicates what kind of action the character is performing. It can also be used to trigger the designated action if no other is being performed. *1 standing *2 freeze guard animation... *3 wasting time (ie. swatting flies) *4 dying *5 fade-away (removed) *6 getting shot *7 limping sort of animation *8 firing (standstill) *9 firing (walking) *A firing (running or rolling) *B step to side *C hop to side *D run to side *E walk along path *F moving (any speed) *10 surrendering *11 freeze guard animation... *12 look around self *13 trigger alarm (activate object) *14 throwing grenade Unknown Offset 0x8, 1 byte. Unknown Offset 0x9, 1 byte. Number of Shots Near Guard Offset 0xA, 1 byte. The number of shots that have been fired within close proximity of the guards, such as over their head. Number of Times Guard has been Shots Offset 0xB, 1 byte. The number of shots that have struck the guard. Unknown Offset 0xC, 1 byte. Unknown Offset 0xD, 1 byte. Possibly a factor in accuracy. Unknown Offset 0xE, 1 byte. Value is set to 0x0A by action type 08. Body Offset 0xF, 1 byte. The model number of the guard's body. Beligerancy Offset 0x10, 1 byte. A special value used in probability tests. The higher the value is, the more likely it is that certain actions will occur, such as throwing grenades. Unknown Offset 0x11, 1 byte. Guard Mode Flags Offset 0x12, 2 bytes. Special bitflags that are used to trigger certain features. Most values are not known. *0200 enable walking on a path *0100 set when the position pointer is invalid *0040 enables the loop counter for actions *0020 eliminate guard Guard Bitflags Offset 0x14, 8 bytes. Guard biflags set special attributes. They can be set when creating a guard, and they can be manipulated using actions. Many fields are still unknown. *80000000 *40000000 *20000000 *10000000 *08000000 *04000000 *02000000 *01000000 *00800000 *00400000 *00200000 Shot/shot at register; Unset by action F8 *00100000 Mark as civilian *00080000 *00040000 *00020000 *00010000 *00008000 *00004000 *00002000 *00001000 *00000800 *00000400 *00000200 *00000100 *00000080 *00000040 *00000020 *00000010 Unknown; marked on Doak from Facility *00000008 Has been on-screen at some point *00000004 Invisible; used by action DD to remove characters from play *00000002 Currently performing an action *00000001 Use sunglasses when applicable Position Data Pointer Offset 0x18, 4 bytes. Pointer to Position Data. This is used to place a character in the stage and track their position. Model Data Pointer Offset 0x1C, 4 bytes. Pointer to the model data used to construct the character. Unknown Offset 0x20, 4 bytes. Value is called by action 61. Unknown Offset 0x24, 4 bytes. Unknown Offset 0x28, 4 bytes. Unknown Offset 0x2C, 4 bytes. Normally 0. Set to -1 (0xFFFFFFFF) when the guard is fading away. This may very well be a fading counter, similar to the stage timer. Unknown Offset 0x30, 4 bytes. Action 08 sets this value to 0. Unknown Offset 0x34, 4 bytes. Action 08 sets this value to 0. Unknown Offset 0x38, 4 bytes. Action 08 sets this value to 0. Unknown Offset 0x3C, 4 bytes. Action 08 sets this value to 2. Unknown Offset 0x40, 4 bytes. Action 08 sets this value to 0, then 1. May have to do with the path preset address. Unknown Offset 0x44, 4 bytes. Unknown Offset 0x48, 4 bytes. Movement Register Offset 0x4C, 4 bytes. Set to zero when the character is moving towards a point. When standing still, set to 1. Unknown Offset 0x50, 4 bytes. Unknown Offset 0x54, 4 bytes. Type of Motion Offset 0x58, 1 byte. Details unknown. Distance Counter Offset 0x59, 1 byte. A counter used to determine the distance required to travel to a given destination. When the target has been reached, the counter will be at zero. Distance to Target Offset 0x5A, 1 byte. The total distance the character is from a destination. This is used when a character is sent to a certain preset, object, or to another character. X Position Offset 0xBC, 4 bytes. A four-byte floating-point number. This gives the x position of the character. Y Position Offset 0xC0, 4 bytes. A four-byte floating-point number. This gives the y position, or elevation, of the character. Z Position Offset 0xC4, 4 bytes. A four-byte floating-point number. This gives the z position of the character. Unknown Offset 0xC8, 4 bytes. Unknown Offset 0xCC, 4 bytes. Reaction Time Offset 0xD0, 4 bytes. A four-byte floating-point number. This sets how quickly the character reacts to the player. Hearing Ability Offset 0xEC, 4 bytes. A four-byte floating-point number. How easily the guard notices gunfire. Specificly, multiplies this value versus the combined sound value of the gunshots, and alarms the guard if the value is too high. Damage Received Offset 0xFC, 4 bytes. A four-byte floating-point number. The amount of damage received by the character. Interestingly, body armor is subtracted from this value. Health Offset 0x100, 4 bytes. A four-byte floating-point number. The total health of the character. This value does not change when damage is recieved. When damage is higher than the health value, the character is killed. Action Block Pointer Offset 0x104, 4 bytes. This is the current action block command being executed by the character. Usually, this controls all the character's actions. Offset within Action Block Offset 0x108, 2 bytes. This value is added to the action block pointer to determine the current command to execute. Action Block Return Pointer Offset 0x10A, 2 bytes. When a JAL or return command value is set, the command's ID is set in this register. User Byte #1 Offset 0x10C, 1 byte. A special register that can be used by certain actions to save a value. User Byte #2 Offset 0x10D, 1 byte. A special register that can be used by certain actions to save a value. Type Designation Offset 0x10E, 1 byte. A bitflag field that denotes what kind of character this is. *80 scientist/civilian Random Value Offset 0x10F, 1 byte. Register used to set a randomly-generated value unique for this character. Loop Counter Offset 0x110, 4 byte2. Activated and used by certain actions to track how many times a certain command has been executed in an action block. 2328 Preset Offset 0x114, 2 bytes. The preset of an object the character has been set to interact with. Use the value 2328 as a preset in order to recall the value. FC Preset Offset 0x116, 2 bytes. This can be set to a specific guard ID value using action F9. Usually this is used to find the nearest guard to a character, then target them. FA Preset Offset 0x118, 2 bytes. This is automatically set to teh ID of a guard when they are visibily killed in front of this character. The ID is cleared automatically. FB Preset Offset 0x11A, 2 bytes. This is automaticaly set to the ID of a guard when they are visibly shot in fornt of this character. The ID is cleared automatically. Unknown Offset 0x150, 4 bytes. Set to zero by action 08. Unknown Offset 0x154, 4 bytes. Set to zero by action 08. Unknown Offset 0x158, 4 bytes. Set to zero by action 08. Unknown Offset 0x15C, 4 bytes. Set to zero by action 08. Right Weapon Position Pointer Offset 0x160, 4 bytes. This pointer saves the Position Data for the weapon in the character's right hand. Left Weapon Position Pointer Offset 0x160, 4 bytes. This pointer saves the Position Data for the weapon in the character's left hand. Hat Position Pointer Offset 0x1D8, 4 bytes. This pointer saves the Position Data for the hat on the character's head. Category:Game information